package xaj.scc.ast;

import polyglot.ext.jl.ast.Node_c;
import polyglot.util.CodeWriter;
import polyglot.util.Position;
import polyglot.visit.PrettyPrinter;

public class SimpleFactor_c extends Node_c implements SimpleFactor {

	private String value;
	
	public SimpleFactor_c(Position pos, String value) {
		super(pos);
		this.value = value;
	}
	
	public String getNonTerminal() {
		return value;
	}

	public SimpleFactor setNonTerminal(String nonTerminal) {
		SimpleFactor_c n = (SimpleFactor_c) copy();
		n.value = nonTerminal;
		return n;
	}

	public void prettyPrint(CodeWriter w, PrettyPrinter tr) {
		w.write(value);
	}

	@Override
	public void accept(Visitor v) {
		v.visitSimpleFactor(this);
		
	}
	
	public String toString() {
		return value;
	}
}
